<?php
class ConfigService
{
	private $config;
	public function __construct(&$config)
	{
		$this->config = &$config;
	}
    public function globals()
    {
		$globals = array(
			'site_name'=>Req::args('site_name'),
			'site_logo'=>Req::args('site_logo'),
			'site_keywords'=>Req::args('site_keywords'),
			'site_description'=>Req::args('site_description'),
			'site_icp'=>Req::args('site_icp'),
			'site_url'=>Req::args('site_url'),
			'site_addr'=>Req::args('site_addr'),
			'site_mobile'=>Req::args('site_mobile'),
			'site_email'=>Req::args('site_email'),
			'site_zip'=>Req::args('site_zip'),
			'site_phone'=>Req::args('site_phone')
		);
		$this->config->set('globals',$globals);
		return true;
    }
    public function photo()
    {
    	$photo = array(
			'photo_width'=>Req::args('photo_width'),
			'photo_small_width'=>Req::args('photo_small_width')
		);
		$this->config->set('photo',$photo);
		return true;
    }
    public function email()
    {
    	$email = array(
			'email_sendtype'=>Req::args('email_sendtype'),
			'email_host'=>Req::args('email_host'),
			'email_ssl'=>Req::args('email_ssl'),
			'email_port'=>Req::args('email_port'),
			'email_account'=>Req::args('email_account'),
			'email_password'=>Req::args('email_password'),
			'email_sender_name'=>Req::args('email_sender_name')
		);
		$this->config->set('email',$email);
		return true;
    }
    public function other(){
        $other_reg_way = Req::args('other_reg_way');
        $other_reg_way = is_array($other_reg_way)?implode(',', $other_reg_way):$other_reg_way;
    	$other = array(
            'other_currency_symbol'=>Req::args('other_currency_symbol'),
            'other_reg_way'=>($other_reg_way==null?'0':$other_reg_way),
    		'other_currency_unit'=>Req::args('other_currency_unit'),
    		'other_is_invoice'=>Req::args('other_is_invoice'),
    		'other_tax'=>Req::args('other_tax'),
    		'other_grade_days'=>Req::args('other_grade_days'),
    		'other_order_delay'=>Req::args('other_order_delay'),
    		'other_order_delay_flash'=>Req::args('other_order_delay_flash'),
    		'other_order_delay_group'=>Req::args('other_order_delay_group'),
    		'other_order_delay_bund'=>Req::args('other_order_delay_bund'),
    		'other_verification_eamil'=>Req::args('other_verification_eamil'),
    	);
    	$this->config->set('other',$other);
		return true;
    }
	public function safe()
    {
    	$safe = array(
			'safe_reg_limit'=>Req::args('safe_reg_limit'),
			'safe_reg_num'=>Req::args('safe_reg_num'),
			'safe_comment_limit'=>Req::args('safe_comment_limit'),
			'safe_comment_num'=>Req::args('safe_comment_num'),
			'safe_album_limit'=>Req::args('safe_album_limit'),
			'safe_album_num'=>Req::args('safe_album_num'),
			'safe_click_count'=>Req::args('safe_click_count')
		);
		$this->config->set('safe',$safe);
		return true;
    }
    public function jjset()
    {
    	$jjset = array(

			//资产仓值
			'jjset_grade_times1'=>Req::args('jjset_grade_times1'), //一级代理商
			'jjset_grade_times2'=>Req::args('jjset_grade_times2'), //二级代理商
			'jjset_grade_times3'=>Req::args('jjset_grade_times3'), //县代理
			'jjset_grade_times4'=>Req::args('jjset_grade_times4'),//市代理

			//分红盈利
			'jjset__fhj1'=>Req::args('jjset__fhj1'), //一级代理商
			'jjset_fhj2'=>Req::args('jjset_fhj2'), //二级代理商
			'jjset_fhj3'=>Req::args('jjset_fhj3'), //县代理
			'jjset_fhj4'=>Req::args('jjset_fhj4'),//市代理

			'jjset_fhj_times'=>Req::args('jjset_fhj_times'),//倍数

			//拓展奖
			'jjset_kzj1'=>Req::args('jjset_kzj1'), //-2人
			'jjset_kzj2'=>Req::args('jjset_kzj2'), //直推3-4人
			'jjset_kzj3'=>Req::args('jjset_kzj3'), //直推5人以上

			//助力奖
			'jjset_zlj1'=>Req::args('jjset_zlj1'), //直推2-4人
			'jjset_zlj2'=>Req::args('jjset_zlj2'), //直推5人以上

			//杠杆资产仓值
			'jjset_grade_limit_times'=>Req::args('jjset_grade_limit_times'),

			//重消积分
			'jjset_cxjf'=>Req::args('jjset_cxjf'),

			//分红积分
			'jjset_jjf'=>Req::args('jjset_jjf'),//进入奖金分
			'jjset_zcf'=>Req::args('jjset_zcf'),//进入注册分

			//税收综合管理服务费
			'jjset_fuf'=>Req::args('jjset_fuf'),



    		'jjset_ck_chongzhi'=>Req::args('jjset_ck_chongzhi'),//成为创客充值
    		'jjset_xxb'=>Req::args('jjset_xxb'), //学习币
    		'jjset_xyb'=>Req::args('jjset_xyb'),//信用币
    		'jjset_gwb'=>Req::args('jjset_gwb'),//购物币
    		'jjset_gwj'=>Req::args('jjset_gwj'),//创客购物积分奖励
    		'jjset_tjj1'=>Req::args('jjset_tjj1'),//推荐创客
    		'jjset_tjj2'=>Req::args('jjset_tjj2'),//推荐商家
            'jjset_tjj3'=>Req::args('jjset_tjj3'),//推荐社区店
            'jjset_tjj4'=>Req::args('jjset_tjj4'),//推荐代理
            'jjset_tjj_ds1'=>Req::args('jjset_tjj_ds1'),//推荐创客3代提
            'jjset_tjj_ds2'=>Req::args('jjset_tjj_ds2'),//推荐商家3代提
    		'jjset_dl_glj'=>Req::args('jjset_dl_glj'),//推荐商家3代提

            'jjset_dl1'=>Req::args('jjset_dl1'),
            'jjset_dl2'=>Req::args('jjset_dl2'),
    		'jjset_dl3'=>Req::args('jjset_dl3'),
    	
            'jjset_dsj1'=>Req::args('jjset_dsj1'),
            'jjset_dsj2'=>Req::args('jjset_dsj2'),
            'jjset_dsj3'=>Req::args('jjset_dsj3'),
            'jjset_dsj4'=>Req::args('jjset_dsj4'),

            'jjset_pttc'=>Req::args('jjset_pttc'),
   	
    		'jjset_sqlgd_jmf'=>Req::args('jjset_sqlgd_jmf'),//社区领购店加盟费
    		'jjset_gw_xxb'=>Req::args('jjset_gw_xxb'),//购物赠送的学习币
    		'jjset_gw_xyb'=>Req::args('jjset_gw_xyb'),//购物赠送的信用币

            'jjset_zf_balance'=>Req::args('jjset_zf_balance'),//支付现金币
            'jjset_zf_gwb'=>Req::args('jjset_tjj1'),//支付购物币

            'jjset_cx'=>Req::args('jjset_cx'),//重消
            'jjset_cx_sd'=>Req::args('jjset_cx_sd'),//重消

            'dk_qdje'=>Req::args('dk_qdje'),//最低额度
            'dk_lx'=>Req::args('dk_lx'),//固定利息
            'dk_qx'=>Req::args('dk_qx'),//期限

            'jjset_txf'=>Req::args('jjset_txf'),//提现手续费比例
            'jjset_txflag'=>Req::args('jjset_txflag'),//提现功能开关
            
    	    
    	    
    	    'jjset_fan_seller'=>Req::args('jjset_fan_seller'),
    	    'jjset_kou_pt_1'=>Req::args('jjset_kou_pt_1'),
    	    'jjset_kou_pt_2'=>Req::args('jjset_kou_pt_2'),
    	    'jjset_xjq_1'=>Req::args('jjset_xjq_1'),
    	    'jjset_xjq_2'=>Req::args('jjset_xjq_2'),
    	    'jjset_up_line_xjq_1'=>Req::args('jjset_up_line_xjq_1'),
    	    'jjset_up_line_xjq_2'=>Req::args('jjset_up_line_xjq_2'),
    	    'jjset_down_line_xjq_1'=>Req::args('jjset_down_line_xjq_1'),
    	    'jjset_down_line_xjq_2'=>Req::args('jjset_down_line_xjq_2'),
    	    "jjset_fan_seller_bei" =>Req::args("jjset_fan_seller_bei"),
    	    "jjset_fan_user_bei" =>Req::args("jjset_fan_user_bei"),
    	    
    	    "jjset_sms_send"=>Req::args("jjset_sms_send"),
    	    "jjset_glj1" =>Req::args("jjset_glj1"),
    	    "jjset_glj2" =>Req::args("jjset_glj2"),
    	    "jjset_glj3" =>Req::args("jjset_glj3"),
    	    
    	    "jjset_fbf" => Req::args("jjset_fbf"),
    	    "jjset_ok_xfjf_price1" => Req::args("jjset_ok_xfjf_price1"),
    	    "jjset_ok_xfjf_price2" => Req::args("jjset_ok_xfjf_price2"),
    	    "jjset_reg_extend_je" => Req::args("jjset_reg_extend_je"),
    	    "jjset_xfq_1" => Req::args("jjset_xfq_1"),
    	    "jjset_xfq_2" => Req::args("jjset_xfq_2"),
    	    
    	    "jjset_shopping_zs_1" => Req::args("jjset_shopping_zs_1"),
    	    "jjset_shopping_zs_2" => Req::args("jjset_shopping_zs_2"),
    	    "jjset_shopping_zs_3" => Req::args("jjset_shopping_zs_3"),
    	    
    	    "jjset_fxj_1" => Req::args("jjset_fxj_1"),
    	    "jjset_fxj_2" => Req::args("jjset_fxj_2"),
    	    "jjset_glj_1" => Req::args("jjset_glj_1"),
    	    "jjset_glj_2" => Req::args("jjset_glj_2"),
    	    "jjset_fh_1" => Req::args("jjset_fh_1"),
    	    "jjset_day_sf_zje" => Req::args("jjset_day_sf_zje"),
    	    "jjset_day_sf_zje_is_ok" => Req::args("jjset_day_sf_zje_is_ok"),
    	    "jjset_sd_day_fhj_je" => Req::args("jjset_sd_day_fhj_je"),
		);
		$this->config->set('jjset',$jjset);
		return true;
    }
}
